import ItemMoudle from "@/components/common/ItemModule"
import TableIndex from "@/components/common/TableIndex"
import TitleMain from "@/components/common/TitleMain"
import type { ColumnsType } from "antd/es/table"

interface DataType {
  name: string
  ip: string
  key: string
  a:string
  c:string
}

const columns: ColumnsType<DataType> = [

  {
    title: '资产IP',
    dataIndex: 'ip',
    ellipsis: true,
    width:130
    
  },
  {
    title: '名称',
    dataIndex: 'name',
    width:110
  },
  {
    title: '归属',
    dataIndex: 'a',
    width:40,
  },
  {
    title: '告警次数',
    dataIndex: 'c',
    width:90
  },
];

const dataSource: DataType[] = [];
for (let i = 0; i < 46; i++) {
  dataSource.push({
    name: `31.176.187.255`,
    ip: `231.176.187.255`,
    key: `${i}`,
    a:'电信',
    c:'234'
  });
}


const AttackProperty = () => {
  return <ItemMoudle
    className="w-[384px]"
    childClassName="h-[276px] flex items-center justify-between"
    header={
      <TitleMain title="攻击资产" />
    }
  >


    <TableIndex<DataType>
      columns={columns}
      data={dataSource}
      scroll={{ y: 200, x: 360 }}
    />

  </ItemMoudle>
}

export default AttackProperty